Skip to content

.NET: Fix AzureFunctions integration tests - set FUNCTIONS_WORKER_RUNTIME#6425

Merged
giles17 merged 1 commit into
mainfrom
az-func-int-fix
Jun 11, 2026
Merged

.NET: Fix AzureFunctions integration tests - set FUNCTIONS_WORKER_RUNTIME#6425
giles17 merged 1 commit into
mainfrom
az-func-int-fix

Conversation

@giles17

@giles17 giles17 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Motivation and Context

Azure Functions Core Tools v4 can no longer auto-detect the dotnet-isolated worker runtime when local.settings.json is absent (it's gitignored). This caused all 12 SamplesValidation and WorkflowSamplesValidation integration tests to fail in CI with:

Can't determine project language from files.
Worker runtime cannot be 'None'. Please set a valid runtime.

Fixes: #6402

Description

  • Add FUNCTIONS_WORKER_RUNTIME=dotnet-isolated environment variable to both StartFunctionApp helpers in SamplesValidation.cs and WorkflowSamplesValidation.cs
  • Remove the temporary skip attributes that were added to unblock CI

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible

Copilot AI review requested due to automatic review settings June 9, 2026 20:43
@giles17 giles17 added the .NET label Jun 9, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Code Review

Reviewers: 5 | Confidence: 95% | Result: All clear

Reviewed: Correctness, Security Reliability, Test Coverage, Failure Modes, Design Approach


Automated review by giles17's agents

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes CI failures in the .NET Azure Functions integration tests by ensuring Azure Functions Core Tools v4 can correctly determine the worker runtime when local.settings.json is not present (as in CI). This re-enables the previously skipped sample validation test suites.

Changes:

  • Set FUNCTIONS_WORKER_RUNTIME=dotnet-isolated in both StartFunctionApp helpers used by the integration tests.
  • Remove temporary [Fact(... Skip=...)] / [RetryFact(... Skip=...)] attributes so the affected tests run again.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
dotnet/tests/Microsoft.Agents.AI.Hosting.AzureFunctions.IntegrationTests/WorkflowSamplesValidation.cs Re-enables workflow sample tests and sets FUNCTIONS_WORKER_RUNTIME when launching the workflow Azure Functions samples.
dotnet/tests/Microsoft.Agents.AI.Hosting.AzureFunctions.IntegrationTests/SamplesValidation.cs Re-enables durable agent sample tests and sets FUNCTIONS_WORKER_RUNTIME when launching the Azure Functions samples.

@giles17 giles17 enabled auto-merge June 10, 2026 03:12
@giles17 giles17 added this pull request to the merge queue Jun 10, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 10, 2026
@giles17 giles17 added this pull request to the merge queue Jun 10, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 10, 2026
@giles17 giles17 added this pull request to the merge queue Jun 10, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 10, 2026
@giles17 giles17 added this pull request to the merge queue Jun 10, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 10, 2026
@giles17 giles17 added this pull request to the merge queue Jun 10, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 10, 2026
Azure Functions Core Tools v4 can no longer auto-detect the worker
runtime when local.settings.json is absent. Add the required
FUNCTIONS_WORKER_RUNTIME=dotnet-isolated environment variable to
both StartFunctionApp helpers and re-enable the skipped tests.

Fixes: #6402

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@giles17 giles17 added this pull request to the merge queue Jun 10, 2026
@giles17 giles17 removed this pull request from the merge queue due to a manual request Jun 10, 2026
@giles17 giles17 added this pull request to the merge queue Jun 10, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 10, 2026
@giles17 giles17 added this pull request to the merge queue Jun 11, 2026
Merged via the queue into main with commit c9e2a49 Jun 11, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.NET: [CI] AzureFunctions SamplesValidation tests fail — func tools cannot detect worker runtime

5 participants